﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<VERKProjectHopur16.Models.aspnet_Membership>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	AllUser
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>All Users</h2>

    <div class="admincontentlist">
        <table>
            <thead>
                <tr>
                    <th><%= Html.ActionLink("Name", "OrderUser", new { id = 1 })%></th>
                    <th><%= Html.ActionLink("E-mail", "OrderUser", new { id = 2 })%></th>
                    <th><%= Html.ActionLink("Join date", "OrderUser", new { id = 3 })%></th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                <% foreach (var item in Model) 
                { %>
                <tr>
                    <td><%: item.aspnet_User.UserName %></td>
                    <td><%: item.Email %></td>  
                    <td><%: item.CreateDate.ToString("dddd, dd MMMM yyyy")%></td>
                    <td><input type="button" onclick="document.location.href = '<%: Url.Action("EditUserRole", new { id = item.UserId.ToString() }) %>'" value="Edit role" /></td>                                               
                </tr>
                <% } %>
            </tbody>
        </table>
    </div>
</asp:Content>
